import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class Test {

    Log logger = LogFactory.getLog(this.getClass());

    public void one(){
        logger.info("进入方法内");
        try {
            System.out.println(8/0);
        }catch (RuntimeException e){
            logger.error("从方法内出来");
        }

    }

    public void log(){
        logger.debug("debug info");
        logger.info("info info");
        logger.warn("warn info");
        logger.error("error info");
        logger.fatal("fatal info");
    }

    public static void main(String[] args) {
        new Test().one();
        new Test().log();

    }
}
